ug_base_part

ug_base_part

Classname: ug_base_part

Inherits from: BaseDesign

 
    This is the system-level ug_base_part class.
    localFrame (Frame)
    The instance's reference frame. It is derived from the referenceFrame.
    The localFrame cannot be modified.
    referenceFrame (Frame)
    The orientation defined by NHA (Next Higher Ancestor, the instance that creates the object.)
    demandOrder (List)
    A list of instance rule names. The order of the instances in the list indicates the evaluation order.
    Normally, the rules are evaluated according to the dependency order calculated by Knowledge Fusion.
    If the evaluation order of a rule is important, then you can specify the demandOrder attribute for
    each of the instances.
    For example, suppose that you have three blocks (A, B, and C). For block C's demandOrder list you
    write {A:,B:} which says that A and B update before C. For block B's demandOrder list you write {A:}
    which says that A updates before B. This establishes a dependency where A updates first, then B,
    then C.
    Note that demandOrder works for instances only.
    demandValue (List)
    DemandValue lets you force a non child rule to be evaluated when no other rule demands it.  DemandValue
    is a list that defines the rules that you wish to be evaluated.  This list can contain elements of two
    different data types each of which represents the rule to be evaluated.  The first data type is a name
    that represents the rule name to be evaluated within the given instance.  The second data type is a string
    that represents the reference chain of the rule to be evaluated.  For example, if instance A has attributes
    B and C then demandValue for instance A can be defined as { B, "A:C:", "D:E:F:" }.  In this example, we will
    evaluate three rules A:B:, A:C: and D:E:F:.  Notice that D:E:F: represents rule F on instance D:E:.
    saveValue (List)
    Lets you force the system to save certain values in the part file and restore them when
    the part is subsequently opened, without re-evaluating the attribute's rule.
    This is useful to avoid losing the value that resulted from a lengthy calculation that may
    have taken a very long time to finish, for example, a lengthy optimization or FEA analysis.
    Note that saveValue is a list of attribute names only, not references.
    saveClass? (Boolean)
    TRUE means that the class definition for the instance and those beneath it are stored in the part file
    and saved with it, making the part file independent of the DFA file(s).
    At the future date, if the class definitions cannot be found in any DFA file, the system uses the class
    definitions stored in the part file. You can use the saveClass? attribute by itself or together with
    saveClassList.
    saveClassList (List)
    Lets you store the actual class definition that may be defined by a NullDesign value in an If -> Then
    construct. Thus, instead of storing a NullDesign, the part file stores the class definition.
    You can use this attribute by itself or together with saveClass?.
    saveClassMixins? (Boolean)
    Instructs the system to automatically and recursively save all the classes that are mixed into
    the classes identified by saveClassList or saveClass?.  If it is set to false then the mixins
    will not be automatically saved along with the classes explicitly specified.
    lockRule? (Boolean)
    TRUE means that the instance cannot be changed outside of Knowledge Fusion (i.e. Modeling).
    For example, if a ug_block instance was locked with lockRule?, then the size of
    the block cannot be changed in Modeling by editing expressions or by editing feature parameters,
    but it can be changed by Knowledge Fusion rules or with Edit Child Rule. (See notes (1) and (2) below.)
    lockRuleParameters (List)
    A list of parameter rule NAMEs which cannot be modified outside of Knowledge Fusion.
    If lockRule? is TRUE, lockRuleParameters is ignored.
    For example, to prevent the user from changing the Length or Width of an instance of ug_block
    in Modeling by editing expressions or editing feature parameters, set the value of lockRuleParameters
    in the block instance to {Length, Width}.
    lockObject? (Boolean)
    TRUE means that the instance cannot be changed by Knowledge Fusion, even if Knowledge Fusion
    rule attempts to change a parameter value. However, the instance can be modified in Modeling.
    (See notes (1) and (2) below.
    onCreate (Any)
    This is evaluated whenever an instance is created.
    onDelete? (Boolean)
    FALSE means that the instance cannot be deleted directly via the UI or API but it can still be deleted
    indirectly via the evaluation of a rule inside the evaluation engine of Knowledge Fusion.  For example,
    by changing the class of an instance from ug_block to NullDesgin, by changing the quantity of a child
    list or by deleting a childlist.  When used, the onDelete? value is usually defined by a rule that
    evaluates to TRUE or FALSE rather than a static value of FALSE.
    onDeleteIgnoreKF? (Boolean)
    TRUE means that onDelete? will be ignored when deleting an instance from KF.
    onModify? (Boolean)
    TRUE means the instance can be modified outside of Knowledge Fusion. See lockRule? and lockRuleParameters.
    onUnload? (Boolean)
    Method for you to release any system resources upon Part close (unload).
    onUndoAllocate (Boolean)
    Method for you to release any system resources upon UNDO.
    Notes (1): If both lockRule? and lockObject? are both TRUE, then the instance cannot be changed
               in anyway. Its parameter values are frozen everywhere.
          (2): The rules that set the values for lockRule? and lockObject? can be as simple as
               the constant values of TRUE and FALSE, or they can be more complex logical rules
               that return the value of TRUE or FALSE.
               For example, you could supply the following rule/formula to the lockRule? parameter
               that would prevent interactive modification of an instance, such as a pad size,
               when a component is present, because the component requires a specific footprint
               for mounting: (ug_askInstanceClass(component:) != NullDesign)
    deleteTopInstance? (Boolean)
    If set to TRUE then the owning top instance is deleted when the given instance's NX object is deleted.
    This attribute gets evaluated very early during update and so like class and quantity attributes, this
    attribute should not depend on evaluation/calculation of NX objects. This attribute should be able to
    resolve purely from KF rules.
    The result is the same as using "Remove rule and Object" from the KF Navigator on the top parent instance.
    For example consider a user class instance "test:" under root which has a child instance at some level
    named "my_block:" which corresponds to a BLOCK feature in UG. If the value of the attribute deleteTopInstance?
    is set to TRUE for my_block: instance, then deleting the BLOCK feature in UG interactively
    by selecting from Graphics or from MNT will result in performing "Removing rule and object" of the instance "test:",
    since that is the top level parent instance of the BLOCK Object. If the attribute was set to FALSE, which is the
    default, then it will simply delete the block and make "my_block:" as NullDesign with a dynamic rule (blue).
    There should not be any references from "test:" either through KF attributes/instances or through hostpointer references to
    anything external to "test:"
DefClass: ug_base_part (BaseDesign);
    (Canonical Frame)                         localFrame:         referenceFrame:;
    (Uncached List Modifiable)                saveValue:          {};

    (Uncached List Modifiable)                saveClassList:      {};
    (Uncached Boolean Lookup Modifiable)      saveClass?:           ;
    (Uncached Boolean Modifiable)             saveClassMixins?:   TRUE;

    (Uncached Boolean)                        onUndoAllocate?:    TRUE;
    (Canonical Frame Parameter Modifiable)    referenceFrame:     NHA:localFrame:;
    (Uncached List Parameter Modifiable)      demandOrder:        {};
    (Uncached List Parameter Modifiable)      demandValue:        {};
    (Uncached Any     Parameter Modifiable)   onCreate:           0;
    (Uncached Boolean Parameter Modifiable)   onDelete?:          TRUE;
    (Uncached Boolean Parameter Modifiable)   onDeleteIgnoreKF?:  FALSE;
    (Uncached Boolean Parameter Modifiable)   onUnload?:          TRUE;
    (Uncached Boolean Parameter Modifiable)   lockRule?:          FALSE;
    A list of parameter rule NAMEs which cannot be modified by editing an object
    (Uncached List Parameter Modifiable)      lockRuleParameters: {};
    (Uncached Boolean Parameter Modifiable)   lockObject?:        FALSE;
    (Uncached List Parameter)                 onObjectSelected:   {};
    (Uncached Boolean Parameter)              onModify?:          %ug_onModify (LockRule?:, LockRuleParameters:);
    (Uncached Boolean Parameter Lookup Modifiable)   deleteTopInstance?: FALSE;
    The function %ug_onModify is an internal function written
    specifically for onModify?.  Do not call this function.
    The function %ug_onModifyStart is an internal function written
    specifically for %ug_onModify.  Do not call this function.
    The function %ug_onModifyEnd is an internal function written
    specifically for %ug_onModify.  Do not call this function.
    The function %ug_askOnModifyValue is an internal function written
    specifically for %ug_onModify.  Do not call this function.
    The function %ug_modfyRule is an internal function written
    specifically for %ug_onModify.  Do not call this function.
    The function %ug_isEqual is an internal function written
    specifically for %ug_onModify.  Do not call this function.